package com.example.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.blog.pojo.FriendList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FriendListMapper extends BaseMapper<FriendList> {
       @Select("select user_id,friend_id from friend_list where user_id=#{userId}")
       List<FriendList> getFriendsList(@Param("userId") int userId);
       @Select("select * from friend_list where user_id=#{userId},friend_id=#{friendId}")
       FriendList getFriendPojo(@Param("userId") int userId,@Param("friendId") int friendId);
}
